<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>问答对管理</title>
    <link rel="stylesheet" href="layui/css/layui.css" media="all">
<!--    <script src="jquery/jquery.min.js"></script>-->
<!--    <script src="layui/layui.js"></script>-->
<!--    <script src="js/get_host.js"></script>-->
<!--    <script src="js/navigation.js"></script>-->
<!--    <script src="js/qa_pair.js"></script>-->
</head>
<body>

<!--侧边导航栏-->
<div class="navigation-page"></div>

<fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;margin-left: 200px">
    <legend>问答对知识库</legend>
</fieldset>

<div class="layui-bg-gray" style="padding: 30px;margin-left: 200px">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-md6">
            <div class="layui-card">
                <div class="layui-card-header">标准问-标准答</div>
                <div class="layui-card-body">
                    <div class="layui-form-item">
                        <button id="total_sync1" type="button" class="layui-btn">全量同步</button>
                        <button id="add" type="button" class="layui-btn layui-btn-normal">添加</button>

                        <input type="text" id="stdq" placeholder="请输入标准问(支持模糊搜索)" class="layui-input"
                               style="width:50%;display: inline-block;margin-left: 100px">

                        <button id="search" type="button" class="layui-btn layui-btn-primary layui-border-black">搜索
                        </button>
                    </div>
                    <table id="stdq_stda" lay-filter="stdq_stda"></table>
                </div>
            </div>
        </div>
        <div class="layui-col-md6">
            <div class="layui-card">
                <div class="layui-card-header">标准问-相似问</div>
                <div class="layui-card-body">
                    <div class="layui-form-item">
                        <button id="total_sync2" type="button" class="layui-btn">全量同步</button>
                        <button id="add2" type="button" class="layui-btn layui-btn-normal">添加</button>
                        <input type="text" id="stdq2" placeholder="请输入标准问(支持模糊搜索)" class="layui-input"
                               style="width:50%;display: inline-block;margin-left: 100px">

                        <button id="search2" type="button" class="layui-btn layui-btn-primary layui-border-black">搜索
                        </button>
                    </div>
                    <table id="stdq_simq" lay-filter="stdq_simq"></table>
                </div>
            </div>
        </div>
    </div>
</div>

<!--弹出层编辑表单(stdq_stda编辑)-->
<div class="site-text" style="margin: 5%; display: none" id="edit-window">
    <form class="layui-form" id="edit-stdq_stda" method="post">
        <div class="layui-form-item">
            <label class="layui-form-label">qa_id</label>
            <div class="layui-input-block">
                <input type="number" id="qa_id" name="qa_id" autocomplete="off" class="layui-input" readonly>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">一级类别</label>
            <div class="layui-input-block">
                <input type="text" id="category1" name="category1" autocomplete="off" placeholder="请输入一级类别"
                       class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">二级类别</label>
            <div class="layui-input-block">
                <input type="text" id="category2" name="category2" autocomplete="off" placeholder="请输入二级类别"
                       class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">标准问</label>
            <div class="layui-input-block">
                <input type="text" id="standard_question" name="standard_question" autocomplete="off"
                       placeholder="请输入标准问" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">标准答</label>
            <div class="layui-input-block">
                <textarea id="standard_answer" name="standard_answer" placeholder="请输入标准答"
                          class="layui-textarea"></textarea>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-input-block">
                <button class="layui-btn" lay-submit lay-filter="formDemo">提交编辑</button>
                <button id="reset" class="layui-btn layui-btn-primary">恢复初值</button>
            </div>
        </div>
    </form>
</div>

<!--弹出层编辑表单(stdq_stda添加)-->
<div class="site-text" style="margin: 5%; display: none" id="add-window-stdq_stda">
    <form class="layui-form" id="add-stdq_stda" method="post">
        <div class="layui-form-item">
            <label class="layui-form-label">qa_id</label>
            <div class="layui-input-block">
                <input type="number" id="qa_id-add-stdq_stda" name="qa_id-add-stdq_stda" autocomplete="off"
                       class="layui-input" placeholder="qa_id请依据表数据递增即可（保证唯一性）">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">一级类别</label>
            <div class="layui-input-block">
                <input type="text" id="category1-add-stdq_stda" name="category1-add-stdq_stda" placeholder="请输入一级类别"
                       class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">二级类别</label>
            <div class="layui-input-block">
                <input type="text" id="category2-add-stdq_stda" name="category2-add-stdq_stda" placeholder="请输入二级类别"
                       class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">标准问</label>
            <div class="layui-input-block">
                <input type="text" id="standard_question-add-stdq_stda" name="standard_question-add-stdq_stda"
                       placeholder="请输入标准问" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">标准答</label>
            <div class="layui-input-block">
                <textarea id="standard_answer-add-stdq_stda" name="standard_answer-add-stdq_stda" placeholder="请输入标准答"
                          class="layui-textarea"></textarea>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-input-block">
                <button class="layui-btn" lay-submit lay-filter="formDemo-add-stdq_stda">立即添加</button>
            </div>
        </div>
    </form>
</div>

<!--弹出层编辑表单(stdq_stda搜索)-->
<div class="site-text" style="margin: 5%; display: none" id="search-window-stdq_stda">
    <form class="layui-form" id="search-stdq_stda" method="post">
        <div class="layui-form-item">
            <label class="layui-form-label">标准问</label>
            <div class="layui-input-block">
                <input type="text" id="standard_question-search-stdq_stda" name="standard_question-search-stdq_stda"
                       placeholder="请输入标准问" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">问答对类型</label>
            <div class="layui-input-block">
                <input type="radio" name="is_multi_turn" value=0 title="单轮" checked>
                <input type="radio" name="is_multi_turn" value=1 title="多轮">
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-input-block">
                <button class="layui-btn" lay-submit lay-filter="formDemo-search-stdq_stda">立即搜索</button>
            </div>
        </div>
    </form>
</div>

<!--弹出层编辑表单(stdq_simq编辑)-->
<div class="site-text" style="margin: 5%; display: none" id="edit-window-stdq_simq">
    <form class="layui-form" id="edit-stdq_simq" method="post">
        <div class="layui-form-item">
            <label class="layui-form-label">qa_id</label>
            <div class="layui-input-block">
                <input type="number" id="qa_id-stdq_simq" name="qa_id-stdq_simq" autocomplete="off" class="layui-input"
                       readonly>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">标准问</label>
            <div class="layui-input-block">
                <input type="text" id="standard_question-stdq_simq" name="standard_question-stdq_simq"
                       autocomplete="off" class="layui-input" readonly>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">相似问(原)</label>
            <div class="layui-input-block">
                <textarea id="similar_question-stdq_simq" name="similar_question-stdq_simq" class="layui-textarea"
                          readonly></textarea>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">相似问(新)</label>
            <div class="layui-input-block">
                <textarea id="similar_question-stdq_simq-new" name="similar_question-stdq_simq-new"
                          class="layui-textarea" autocomplete="off"></textarea>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-input-block">
                <button class="layui-btn" lay-submit lay-filter="formDemo-stdq_simq">提交编辑</button>
            </div>
        </div>
    </form>
</div>

<!--弹出层编辑表单(stdq_simq添加)-->
<div class="site-text" style="margin: 5%; display: none" id="add-window-stdq_simq">
    <form class="layui-form" id="add-stdq_simq" method="post">
        <div class="layui-form-item">
            <label class="layui-form-label">qa_id</label>
            <div class="layui-input-block">
                <input type="number" id="qa_id-add-stdq_simq" name="qa_id-add-stdq_simq" class="layui-input"
                       placeholder="请输入qa_id">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">标准问</label>
            <div class="layui-input-block">
                <input type="text" id="standard_question-add-stdq_simq" name="standard_question-add-stdq_simq"
                       class="layui-input" placeholder="请输入与qa_id对应的标准问">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">相似问</label>
            <div class="layui-input-block">
                <textarea id="similar_question-add-stdq_simq" name="similar_question-add-stdq_simq"
                          class="layui-textarea" placeholder="请输入要添加相似问"></textarea>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-input-block">
                <button class="layui-btn" lay-submit lay-filter="formDemo-add-stdq_simq">立即添加</button>
            </div>
        </div>
    </form>
</div>

<!--js脚本-->
<script src="jquery/jquery.min.js"></script>
<script src="layui/layui.js"></script>
<script src="js/get_host.js"></script>
<script src="js/navigation.js"></script>
<script src="js/qa_pair.js"></script>
</body>
<!--数据表格操作栏(编辑、删除等)-->
<script type="text/html" id="barDemo">
    <a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a>
    <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
</script>
</html>